﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RenovationOfLists
{
    public partial class pass : Form
    {
        public string sPassword = "";
        public pass()
        {
            InitializeComponent();
        }

        private void button10_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat (textBox1.Text, 0); button11.Enabled = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 1); button11.Enabled = true;

        }
        private void m(object o)
        {
            MessageBox.Show(o.ToString());

        }

        private void button2_Click(object sender, EventArgs e)
        {

            textBox1.Text = string.Concat(textBox1.Text, 2); button11.Enabled = true;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 3); button11.Enabled = true;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 4); button11.Enabled = true;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 5); button11.Enabled = true;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 6); button11.Enabled = true;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 7); button11.Enabled = true;
        }

        private void button8_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 8); button11.Enabled = true;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            textBox1.Text = string.Concat(textBox1.Text, 9); button11.Enabled = true;
        }

        private void button11_Click(object sender, EventArgs e)
        {

            string ss = "",s;
            if (textBox1.Text.Length > 0) 
            {
                 s=textBox1.Text;
                ss = s.Substring(0, s.Length - 1); textBox1.Text = ss;
                if (textBox1.Text.Length == 0) button11.Enabled = false;
            }
            
        }

        private void button12_Click(object sender, EventArgs e)
        {
            sPassword = textBox1.Text;  
            this.Close();
        }
    }
}
